package com.steven.unittest;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void sayHello(View view)
    {
        EditText editText = findViewById(R.id.editText);
        String   name = editText.getText().toString();
        ((TextView)findViewById(R.id.textView)).setText("Hello," + name + "!");
    }

    public void onJumpActivity2(View view)
    {
        startActivity(new Intent(this, Activity2.class));
    }
}
